#include "SensorParameter.h"
#include <glm/glm.hpp>

SensorParameter::SensorParameter () : frameWidth (0), frameHeight (0),
		frameDepth (0), frameSize (0), depthPixelWidth (0), rgbPixelWidth (0) {}

SensorParameter::~SensorParameter () {}

void SensorParameter::writeTo (std::ofstream& outStream) const
{
	outStream.write ((char*)&frameWidth, sizeof (frameWidth));
	outStream.write ((char*)&frameHeight, sizeof (frameHeight));
	outStream.write ((char*)&frameDepth, sizeof (frameDepth));
	outStream.write ((char*)&frameSize, sizeof (frameSize));
	outStream.write ((char*)&depthPixelWidth, sizeof (depthPixelWidth));
	outStream.write ((char*)&rgbPixelWidth, sizeof (rgbPixelWidth));
}

void SensorParameter::readFrom (std::ifstream& inStream)
{
	inStream.read ((char*)&frameWidth, sizeof (frameWidth));
	inStream.read ((char*)&frameHeight, sizeof (frameHeight));
	inStream.read ((char*)&frameDepth, sizeof (frameDepth));
	inStream.read ((char*)&frameSize, sizeof (frameSize));
	inStream.read ((char*)&depthPixelWidth, sizeof (depthPixelWidth));
	inStream.read ((char*)&rgbPixelWidth, sizeof (rgbPixelWidth));
}